import {ModuleWithProviders} from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {PagesComponent} from "./pages.component";
import {PageNotFoundComponent} from "./page-not-found/page-not-found.component";

const routes: Routes = [
  {
    path: 'pages',
    component: PagesComponent,
    children: [
      {path: '', redirectTo: 'exhibition', pathMatch: 'full'},
      {path: 'home', loadChildren: './home/home.module#HomeModule'},
      {path: 'performance-analysis', loadChildren: './performance-analysis/performance-analysis.module#PerformanceAnalysisModule'},
      {path: 'exhibition', loadChildren: './exhibition/exhibition.module#ExhibitionModule'},
      {path: 'condition-monitoring', loadChildren: './condition-monitoring/condition-monitoring.module#ConditionMonitoringModule'},
      {path: '**', component: PageNotFoundComponent}
  ]},
    {
      path: 'login',
      loadChildren: 'app/pages/login/login.module#LoginModule'
    },{
      path: 'admin',
      component: PagesComponent
    }
  ];
export const PagesRouting: ModuleWithProviders = RouterModule.forChild(routes)

